package com.bawei.module_advice.http

import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.flowOn
import javax.inject.Inject

class AdviceRepository @Inject constructor(){


    @Inject
    @AdviceNetModule.CommonAdviceApi
    lateinit var api:AdviceApi
    fun getAdvice(page:Int,size:Int)= flow {
        //  请求 返回数据
        //1
        emit(api.getAdviceList(page, size))
    }.flowOn(Dispatchers.IO)






}